#ifndef TRACKWAYPOINT_H
#define TRACKWAYPOINT_H

#include "IncFreeTrack.h"
#include "trackpoint.h"

class TrackWaypoint : public TrackPoint
{
public:
    TrackWaypoint();
    TrackWaypoint(const TrackPoint& other, const QString&, const QString&, int& );
    TrackWaypoint(const TrackPoint& other, const QString&, const QString& );
    TrackWaypoint(QXmlStreamReader*);

    // Set point name (used for waypoints)
    bool setName( const QString& );
    QString getName();
    // Set point description (used for waypoints)
    bool setDescription( const QString& );
    QString getDescription();

    void toGpx(QXmlStreamWriter* stream) const;
    void fromGpx( QXmlStreamReader* stream );

    QPoint draw(QPainter&, QColor, const QTransform&) const;

    int getId();

private:
    int id;

};

typedef QHash<int, TrackWaypoint> WaypointsHash;

#endif // TRACKWAYPOINT_H
